import http from '@/utils/http';

const transferOrder = {
  //调拨单视图
  query(params: any) {
    let url = '/TransferOrder/Query';
    return http.post(url, params);
  },
  //调拨单详情
  detail(id: Number) {
    let url = '/TransferOrder/Detail';
    let params = { id: id };
    return http.get(url, params);
  },
  //调拨单保存
  save(params: Object) {
    let url = '/TransferOrder/Save';
    return http.post(url, params);
  },
  //调拨单审核
  check(ids: Array<Number>) {
    let url = '/TransferOrder/Check';
    const params = { ids };
    return http.post(url, params);
  },
  //调拨单弃审
  unCheck(ids: Array<Number>) {
    let url = '/TransferOrder/UnCheck';
    const params = { ids };
    return http.post(url, params);
  },
  //调拨单取消
  cancel(ids: Array<Number>) {
    let url = '/TransferOrder/Cancel';
    const params = { ids };
    return http.post(url, params);
  },
  //获取可收货的调拨单列表
  getCanReceivePurchaseOrder() {
    let url = '/TransferOrder/GetCanReceivePurchaseOrder';
    return http.get(url);
  },
  //导出
  export(params: Object) {
    let url = '/TransferOrder/Export';
    return http.postDownload(url, params);
  },
};
export default transferOrder;
